<template>
  <div class="block">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage4"
      :page-sizes="pageSizes ? pageSizes : [4]"
      :page-size="1"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>
<script>
export default {
  props: ["total", "pageSizes"],
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      this.$emit("handleCurrentChange", val);
    },
  },
  data() {
    return {
      currentPage4: 1,
    };
  },
};
</script>
<style scoped>
.block >>> .el-pagination__total {
  color: #fff !important;
}
.block >>> .el-input__inner {
  background-color: #2b2c2d !important;
  border: none !important;
  color: #fff !important;
  padding: 0 !important;
}
.block >>> .el-pagination__jump {
  color: #fff !important;
}
.block >>> .el-pagination .btn-next,
.block >>> .el-pagination .btn-prev {
  background: #2b2c2d !important;
  color: #fff !important;
}
.block >>> .el-pagination .btn-prev:hover,
.block >>> .el-pagination .btn-next:hover {
  color: #00ffb0 !important;
}
.block >>> .el-pagination .btn-prev {
  margin-right: 10px;
}
.block >>> .el-pager li {
  background: #2b2c2d !important;
  color: #fff;
  margin-right: 10px !important;
}
.block >>> .el-pager li:hover {
  color: #00ffb0 !important;
}
.block >>> .el-pager li.active {
  color: #1e2020 !important;
  cursor: default;
  background: #00ffb0 !important;
}
</style>
